<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Auth::routes();
Route::get('/', function () { return response()->redirectToRoute("login"); });
Route::any('/wxservice',    "Controller@wxservice");

/*=================深圳同铸积分系统=========================*/
/*后台系统*/
Route::get('/home',             'HomeController@index')->name('home');
Route::get('/admin/users',      "HomeController@users");
Route::get('/admin/records',    "HomeController@records");
Route::get('/admin/recordmap',  "HomeController@recordmap");
Route::any('/admin/record',     "HomeController@record");

/*银行接口*/
Route::namespace("ChinaBank")->prefix("cardApi")->group(function(){

    Route::post('cardAuthAp/createAuth',"BankApiController@createAuth");
    Route::post('elec/useElecCard',     "BankApiController@useElecCard");
    Route::post('elec/queryElecCard',   "BankApiController@queryElecCard");
    Route::post('elec/docheckTickets',  "BankApiController@docheckTickets");
});

/*前端系统*/
Route::namespace('ChinaBank')->prefix('bank')->middleware(['web','wxlogin'])->group(function(){
    Route::any("index",             'HomeController@index');
    Route::any('exchange',          'HomeController@exchange');
    Route::any('sendCode',          'HomeController@sendCode');
    Route::any('checkCode',         'HomeController@checkCode');
    Route::any('exchangeAction',    "HomeController@exchangeAction");
    Route::any('orders',            "HomeController@orders")->name('orders');
    Route::any('goods',             "HomeController@goods");
    Route::any('checkCard',         "HomeController@checkCard");
});


/*======================深圳绿悠积分系统==========================*/
/*前端系统*/
Route::namespace('ChinaBankCard.App')->prefix('chinaBankCard')->middleware(['web'])->group(function(){
    Route::any('/index','HomeController@index');
});
